package io;

import java.io.File;
import java.io.IOException;
import java.util.Map;

/**
 * @program: javase
 * @description:
 * @author: lld
 * @create: 2020-11-21 16:36
 **/
public class Demo1 {
    public static void main(String[] args) throws IOException {
        File file=new File("C:\\Users\\小东\\IdeaProjects\\javase\\other\\src\\io\\新建文本文档.txt");
//        System.out.println(file.getParent());
        File file2=new File(file.getParent(), "old.txt");
        file2.createNewFile();
        //创建文件夹
        File file1 = new File("C:\\Users\\小东\\IdeaProjects\\javase\\other\\src\\io\\ioo");
        if(!file1.exists())
        file1.mkdir();
    }

}
